<%@	Page Language="C#" MasterPageFile="~/MyMasterPage.master" Title="Your Name Here | Photos"
	CodeFile="Photos.aspx.cs" Inherits="Photos_aspx" EnableViewState="false" %>

<asp:content id="Content1" contentplaceholderid="ContentPlaceHolder1" runat="server">
		<% string siteDirName =Application["siteDirName"].ToString(); %>
		<% string extension = Application["extension"].ToString(); %>  
	
	<div class="shim solid"></div> 
	  
	<div class="page" id="photos">
		<div class="buttonbar buttonbar-top">
			<a href="<%=siteDirName %>Albums/Albums<%=extension%>"><asp:image ID="Image1" runat="Server" skinid="gallery" /></a>
		</div>
		<asp:DataList ID="DataList1" runat="Server"	cssclass="view"	dataSourceID="ObjectDataSource1" 
			repeatColumns="4" repeatdirection="Horizontal" onitemdatabound="DataList1_ItemDataBound" EnableViewState="false">
			<ItemTemplate>
				<table border="0" cellpadding="0" cellspacing="0" class="photo-frame">
					<tr>
						<td class="topx--"></td>
						<td class="top-x-"></td>
						<td class="top--x"></td>
					</tr>
					<tr>
						<td class="midx--"></td>
						<td>
						<%--./Albums/Photos/--%>
						<%--<a href='Details.aspx?AlbumID=<%# Eval("AlbumID") %>&Page=<%# Container.ItemIndex %>'>
						<a href='./Albums/Photos/<%# Eval("AlbumID") %>/' >
						
						 <rewrite url="^~/Albums/Photos/Details/AlbumID/(.+)/Page/(.+)"  to="~/Details.aspx?AlbumID==$1&Page=$2" />
						--%>
		                <% string siteDirName = System.Configuration.ConfigurationManager.AppSettings["siteDirName"].ToString(); %>
		                <% string extension = System.Configuration.ConfigurationManager.AppSettings["extension"].ToString(); %>  
                					
    						<a href='<%=siteDirName %>Albums/Details/<%# Eval("AlbumID") %>/<%#Container.ItemIndex%>/<%# ModifiedCaption(Eval("Caption")) %><%=extension%>'>
							<img src="<%=siteDirName %>Albums/Handler.ashx?PhotoID=<%# Eval("PhotoID") %>&Size=S" class="photo_198" style="border:4px solid white" alt='Thumbnail of <%# ModifiedCaption(Eval("Caption")) %>' /></a></td>
						<td class="mid--x"></td>
					</tr>
					<tr>
						<td class="botx--"></td>
						<td class="bot-x-"></td>
						<td class="bot--x"></td>
					</tr>
				</table>
				<p><%# Server.HtmlEncode(Eval("Caption").ToString()) %></p>
			</ItemTemplate>
			<FooterTemplate>
			</FooterTemplate>
		</asp:DataList>
		<asp:panel id="Panel1" runat="server" visible="false" CssClass="nullpanel">There are currently no pictures in this album.</asp:panel>
		<div class="buttonbar">
			<a href="<%=siteDirName %>Albums/Albums<%=extension%>"><asp:image id="gallery" runat="Server" skinid="gallery" /></a>
		</div>
	</div>
	
	<asp:ObjectDataSource ID="ObjectDataSource1" Runat="server" TypeName="PhotoManager" 
		SelectMethod="GetPhotos">
		<SelectParameters>
			<asp:QueryStringParameter Name="AlbumID" Type="Int32" QueryStringField="AlbumID" DefaultValue="0"/>
		</SelectParameters>
	</asp:ObjectDataSource>
	
</asp:content>
